package com.mach.platform.controller;

import com.mach.platform.domain.ModifyOrderLogs;
import com.mach.platform.domain.Response;
import com.mach.platform.service.ModifyOrderLogsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("modifyOrderLogs")
public class ModifyOrderLogsCtrl extends BaseCtrl<ModifyOrderLogs> {
    @Autowired
    private ModifyOrderLogsServiceImpl modifyOrderLogsService;
    @Override
    public Response info(Long id) {
        return null;
    }

    /**
     * 分页查询
     * @param pageable
     * @param params
     * @return
     */
    @GetMapping("/findByPage")
    public Response list(@PageableDefault(sort = {"modifyTime"}, direction = Sort.Direction.DESC) Pageable pageable, @RequestParam Map params) {
        return Response.ok(modifyOrderLogsService.list(pageable, params));
    }

    @Override
    public Response delete(Long[] ids) {
        return null;
    }

    @Override
    public Response save(ModifyOrderLogs modifyOrderLogs) {
        return null;
    }

    @Override
    public Response update(ModifyOrderLogs modifyOrderLogs) {
        return null;
    }
}
